<html>
<head>
	<script src="ical.js"></script>
<script>
var ics="BEGIN:VCALENDAR\nCALSCALE:GREGORIAN\nVERSION:2.0\nX-WR-CALNAME:Tag der Arbeit\nMETHOD:PUBLISH\nPRODID:-//Apple Inc.//Mac OS X 10.8.3//EN\nBEGIN:VEVENT\nUID:DE-IF-0501\nDTEND;VALUE=DATE:20000502\nRRULE:FREQ=YEARLY;INTERVAL=1\nTRANSP:OPAQUE\nSUMMARY:Tag der Arbeit\nDTSTART;VALUE=DATE:20000501\nDTSTAMP:20130430T083144Z\nSEQUENCE:0\nBEGIN:VALARM\nX-WR-ALARMUID:A82EECA2-E958-4A56-BA83-93A4051D7903\nUID:A82EECA2-E958-4A56-BA83-93A4051D7903\nTRIGGER:-PT15H\nATTACH;VALUE=URI:Basso\nACTION:AUDIO\nX-APPLE-LOCAL-DEFAULT-ALARM:TRUE\nX-APPLE-DEFAULT-ALARM:TRUE\nACKNOWLEDGED:20130430T083144Z\nEND:VALARM\nEND:VEVENT\nEND:VCALENDAR\n";
var ical=new ICal(ics);

function init(){
	document.getElementById('before').innerHTML=ics;
	document.getElementById('converted').innerHTML=ical.toJSONpretty();
	document.getElementById('after').innerHTML=ical.toICal();
}
</script>
</head>
<body onload='init()'>

<h1>before</h1>
<pre id='before'></pre>
<h1>json</h1>
<pre id='converted'></pre>
<h1>after</h1>
<pre id='after'></pre>
</body>
</html>